<template>
	<view class="status_bar">
		<image class="icon" @click="gohome" src="/static/icon/home.png" alt="" />
		<view class="title">
			{{title}}
		</view>
	</view>
	<view class="box">

	</view>
</template>

<script>
	export default {
		props: ["title"],
		data() {
			return {
				tops: 0,
				height: 0,
			}
		},
		methods: {
			gohome() {
				uni.switchTab({
					url: '/pages/home/index'
				})
			}
		},
		mounted() {}
	}
</script>

<style scoped>
	.status_bar {
		position: relative;
		width: 100%;
		height: calc(44px + env(safe-area-inset-top));
		background-color: #fff;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.icon {
		left: 10rpx;
		top: 50%;
		transform: translateY(-45%);
		/* top:0; */
		position: absolute;
		height: 40rpx;
		width: 40rpx;
	}

	.title {
		font-weight: bold;
	}
</style>